package com.mimc.framework.events;

import com.jfinal.aop.Inject;
import com.mimc.common.constant.EventConstants;
import com.mimc.service.ShTranslateService;
import io.jboot.components.event.JbootEvent;
import io.jboot.components.event.JbootEventListener;
import io.jboot.components.event.annotation.EventConfig;
import lombok.extern.slf4j.Slf4j;

@EventConfig(action = {EventConstants.LOADTRANSLATEEVENT})
@Slf4j
public class LoadTranslateEventListener implements JbootEventListener {
    @Inject
    private ShTranslateService shTranslateService;
    @Override
    public void onEvent(JbootEvent event) {
        log.info("重载缓存");
        shTranslateService.loadLangCache();
    }
}
